﻿@using ABC.Controllers.ViewModels.My
@using ABC.Core.Extentions
@using ABC.Domain.Entities
@model ComparisonViewModel
@{
    ViewBag.Title = "Сравнение";
    Layout = "~/Views/Shared/_MyLayout.cshtml";
}
<div class="page-header">
    <h2>
        Сравнение предложений</h2>
</div>
<div class="tab-pane" id="comprasion">
    <table class="table table-bordered ">
        <thead>
            <tr>
                <th rowspan="2">
                    Премия и тариф
                </th>
                @foreach (var company in Model.CompaniesForComparison)
                {
                    <th>
                        @company.CompanyName
                    </th>
                }
            </tr>
            <tr>
                @foreach (var company in Model.CompaniesForComparison)
                {
                    <th>
                        @company.KaskoValue руб.
                    </th>
                }
            </tr>
        </thead>
        <tbody>
            @for (var i = 0; i < Comparison.ServicePrograms.Length; i++)
            {
                <tr>
                    <td>
                        @Comparison.ServicePrograms[i]
                    </td>
                    @for (int j = 0; j < Model.CompaniesForComparison.Count; j++)
                    {
                        <td>
                            @(Model.CompaniesForComparison[j].Is[i] ? "•" : "—")
                        </td>
                    }
                </tr>
            }
        </tbody>
    </table>
    <div class="btn-toolbar">
        <button class="btn">
            Выгрузить в PDF</button>
    </div>
</div>
